import pymysql
from fastapi import FastAPI,Form

app=FastAPI()
@app.post("/s")
def s(id:int=Form(...),status:str=Form(...)):
    conn=pymysql.Connection(user="root",password="123456Aa",database="2306a")
    curses=conn.cursor()
    curses.execute("update sp set status=%s where id=%s",(status,id))
    conn.commit()
    return {"info":"修改成功"}